﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using PagedList;
using LKVMLMADMIN.Models;
namespace LKVMLMADMIN.Controllers
{
    public class HomeController : Controller
    {     
        public ActionResult Index()
        {
            ViewBag.Title = "Trang chủ";
            if (Session["User"] != null)
            {
                var extension = new LKVService.User();
                var configParent = extension.getConfigTree();
                if (configParent.Option_1 == true)
                {
                    ViewBag.SysTree = "1";
                }
                if (configParent.Option_2 == true)
                {
                    ViewBag.BinaryTree = "2";
                }
                return RedirectToAction("Userprofile", "Account");
            }
            else
                return RedirectToAction("Login", "Account");
        }   
        public ActionResult About()
        {
            ViewBag.Message = "Your app description page.";

            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View();
        }
    }
}
